home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 50
/
Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso
/
Aminet
/
text
/
edit
/
tecoc-146.lha
/
exelst.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-05
|
1KB
|
51 lines
/*****************************************************************************
ExeLst()
This function executes a less-than-sign (<) command.
n< Iterate n times
*****************************************************************************/
#include "zport.h" /* define portability identifiers */
#include "tecoc.h" /* define general identifiers */
#include "defext.h" /* define external global variables */
#include "deferr.h" /* define identifiers for error messages */
DEFAULT ExeLst() /* execute a < command */
{
DBGFEN(1,"ExeLst",NULL);
if (++LStTop >= LPS_SIZE) { /* if loop stack is full */
ErrMsg(ERR_PDO); /* push-down list overflow */
DBGFEX(1,DbgFNm,"FAILURE");
return FAILURE;
}
if (EStTop == EStBot) { /* if no numeric argument */
NArgmt = INFINITE; /* make it an infinite loop */
} else {
if (GetNmA() == FAILURE) { /* get numeric argmument */
DBGFEX(1,DbgFNm,"FAILURE");
return FAILURE;
}
if (NArgmt <= 0) { /* if null loop */
if (FlowEL()== FAILURE) { /* flow to end of loop */
DBGFEX(1,DbgFNm,"FAILURE");
return FAILURE;
}
CmdMod = '\0'; /* clear modifiers flags */
DBGFEX(1,DbgFNm,"SUCCESS");
return SUCCESS;
}
}
LStack[LStTop].LIndex = NArgmt; /* store loop index */
LStack[LStTop].LAddr = CBfPtr; /* store loop start */
CmdMod = '\0'; /* clear modifiers flags */
DBGFEX(1,DbgFNm,"SUCCESS");
return SUCCESS;
}